import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 获取菜单列表
  fetchMenuList: (query) => api.get(`${config.interfaces.type5}portfolio-server/resources/alltree`, query),
  // 新增菜单
  addMenu: (query) => api.post(`${config.interfaces.type5}portfolio-server/resources/add`, query),
  // 编辑菜单
  updateMenu: (query) => api.post(`${config.interfaces.type5}portfolio-server/resources/update/${query.id}`, query),
  // 删除菜单
  deleteMenu: (query) => api.post(`${config.interfaces.type5}portfolio-server/resources/cancel/${query.id}`, query),
  //
  fetchRoles: (query) => api.get(`${config.interfaces.type5}portfolio-server/ims/allRoles`, query),
};
